package com.lion.common.modules.file.common.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * @author Chris Chan
 * Create On 2025/8/26 下午5:01
 * Use for: 文件模块配置
 * Explain:
 */
@ConfigurationProperties(prefix = "file")
@Data
public class FileProperties {

    /**
     * 文件存储策略: local, minio
     */
    private String strategy = "local";

    /**
     * 本地存储配置
     */
    private Local local = new Local();

    /**
     * MinIO配置
     */
    private Minio minio = new Minio();

    /**
     * SeaweedFS配置
     */
    private SeaweedFS seaweedfs = new SeaweedFS();

    /**
     * 本地存储配置
     */
    @Data
    public static class Local {
        private String baseDir = "/var/server/lion/cup/file";
        private String baseUrl = "http://localhost:8088";
    }

    /**
     * MinIO配置
     */
    @Data
    public static class Minio {
        private String endpoint = "http://art.chris.com:9000";
        private String accessKey = "vhgrHnckZK1g6n74A5li";
        private String secretKey = "DjOwBWMSK1axQyyl5ZMhi68ltFqLpZJLW6OZhkT6";
        private String bucket = "cup";
    }

    /**
     * SeaweedFS配置
     */
    @Data
    public static class SeaweedFS {
        private String filter = "http://192.168.0.59:8888";
        private String master = "http://192.168.0.59:9333";
        private String remote = "/cup/file";
    }
}